package com.wf.course.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.utils.page.PageBean;
import com.wf.course.dao.INoticeMapper;
import com.wf.course.model.comm.Notice;
import com.wf.course.service.INoticeService;

@Service
@Transactional
public class INoticeServiceImpl implements INoticeService {
	
	@Autowired
	private INoticeMapper mapper;

	@Override
	public void getNoticeList(PageBean<Notice> pageBean) {
		// TODO Auto-generated method stub
		
		pageBean.setResults(mapper.getNoticeList(pageBean));
		pageBean.setTotalCount(mapper.getNoticeCount(pageBean));
		
	}

	@Override
	public void saveNotice(Notice notice) {
		// TODO Auto-generated method stub
		mapper.saveNotice(notice);
		
	}

	@Override
	public void deleteNotice(Integer id) {
		// TODO Auto-generated method stub
		mapper.deleteNotice(id);
		
	}

	@Override
	public Notice downLoadNotice(Integer id) {
		// TODO Auto-generated method stub
		return mapper.downLoadNotice(id);
	}

	@Override
	public Integer updateNotice(Notice notice) {
		// TODO Auto-generated method stub
		return mapper.updateNotice(notice);
		
	}

	 

}
